const BlogService = require('../service/blogs');

class BlogController {
  async add(ctx) {
    const data = await BlogService.add(ctx);
    ctx.body = data;
  }
  // search
  async search(ctx) {
    const data = await BlogService.search(ctx);
    ctx.body = data;
  }
  // update
  async update(ctx) {
    const data = await BlogService.update(ctx);
    ctx.body = data;
  }
}

module.exports = new BlogController